package cn.wjx.taobaounion.utils;

import android.content.Context;
import android.content.Intent;

import cn.wjx.taobaounion.model.domain.IBaseInfo;
import cn.wjx.taobaounion.presenter.ITicketPresenter;
import cn.wjx.taobaounion.ui.activity.TicketActivity;

/**
 * @author WuChangJian
 * @date 2020/6/26 20:30
 */
public class TicketUtil {

    public static void toTicketPage(Context context, IBaseInfo baseInfo) {
        String title = baseInfo.getTitle();
        String url = baseInfo.getUrl();
        String cover = baseInfo.getCover();
        ITicketPresenter ticketPresenter = PresenterManger.getInstance().getTicketPresenter();
        ticketPresenter.getTicket(title, cover, url);
        Intent intent = new Intent(context, TicketActivity.class);
        intent.putExtra("title", title);
        intent.putExtra("url", url);
        intent.putExtra("cover", cover);
        context.startActivity(intent);
    }
}
